from chapter5.regular_test.re_test_patterns import test_patterns

if __name__ == '__main__':
    text = 'This is some text -- with punctuation.'

    patterns = [
        ('[a-z]+', "由小写字母组成的串"),
        ('[A-Z]+', "由大写字母组成的串"),
        ('[a-zA-Z]+', "由大小写字母组成的串"),
        ('[A-Za-z]+', "由大小写字母组成的串"),
        ('[A-Z][a-z]+', "由由大写字母紧跟着至少一个小写字母组成的串"),
        ('[A-Z]*[a-z]+', "由由大写字母0个或者1个紧跟着至少一个小写字母组成的串"),
    ]

    test_patterns(text=text, patterns=patterns)
